<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .xing{
            width: 250px;
            height: 80px;
            background-color: #ccc;
            color: yellow;
            font-size: 50px;
        }
    </style>
</head>
<body>
    <div class="xing">
        <span>☆</span><span>☆</span><span>☆</span><span>☆</span><span>☆</span>
    </div>
    <script src="lib/jquery-3.3.1.min.js"></script>
    <script>
        var Checked = false;
        $(".xing>span").mousemove(function(){
            if(!Checked){
                $(this).text("★").prevAll().text("★").end().nextAll().text("☆");
            }
        });
        $(".xing>span").mouseleave(function(){
            if(!Checked){
                $(".xing>span").text("☆");
            }
        });
        $(".xing>span").click(function(){
            Checked = true;
        });
    </script>
</body>
</html>